from fastapi import FastAPI
from fastapi.routing import Mount
from loguru import logger
from routes.api import api_router
from routes.index import router


def boot(app:FastAPI):
    # 首页
    app.include_router(router)
    # 注册api路由[routes/api.py]
    app.include_router(api_router, prefix="/api")

    # 打印路由
    if app.debug:
        for route in app.routes:
            logger.debug(route)
